package bulid;

/**
 * @author aiowang
 * @description:
 * @date 2020/9/10 21:28
 */
public class ThreadImplementsTest {

    public static void main(String[] args) {
        testImplements();
    }

    private static void testImplements() {
        ThreadImplements threadImplements = new ThreadImplements();
        Thread t1 = new Thread(threadImplements);
        Thread t2 = new Thread(threadImplements,"my thread -2");
        t1.start();
        t2.start();
    }


}

class ThreadImplements implements Runnable {

    @Override
    public void run() {
        System.out.println("通过实现Runable，线程号:" + Thread.currentThread().getName());
    }
}
